#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include<math.h>
#define MAXN 10

double f(int n, double a[], double x)
{
    int i = 0;
    
    double ret = 0;
    
    for (i = 0; i <= n; i++)
    {
        scanf("%lf", &a[i]);
        ret = a[i] * pow(x, i);
        ret += ret;
    }
    
    return ret;
}

int main()
 {
    int n, i;
    double a[MAXN], x;

    scanf("%d %lf", &n, &x);
    
    printf("%.1f\n", f(n, a, x));
    return 0;
}
